(function (wnd) {
    $('select.cbxCurPage').change(function (e) {
        $("#frmPaging").submit();
    });

    $('select.cbxPageSize').change(function (e) {
        $("#frmPaging").submit();
    });

    $('.btnFirst').click(function () {
        $('select.cbxCurPage').val(0);
        $("#frmPaging").submit();
    });

    $('.btnPre').click(function () {
        var currentSize = $('select.cbxCurPage').val();
        $('select.cbxCurPage').val(parseInt(currentSize, 10) - 1);
        $("#frmPaging").submit();
    });

    $('.btnNext').click(function () {
        var currentSize = $('select.cbxCurPage').val();
        $('select.cbxCurPage').val(parseInt(currentSize, 10) + 1);
        $("#frmPaging").submit();
    });

    $('.btnLast').click(function () {
        var currentSize = $('select.cbxCurPage > option:last-child').val();
        $('select.cbxCurPage').val(currentSize);
        $("#frmPaging").submit();
    });
})(window)